home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cuj1008.zip
/
1008071A
< prev
next >
Wrap
Text File
|
1991-10-14
|
2KB
|
60 lines
/*
Copyright (c) Robert Ramey 1991. All Rights Reserved
*/
#include <stdio.h>
#include <signal.h>
#include "psort.h"
#include "os.h"
/*********************************************************************
os_init - initialize input/output
**********************************************************************/
os_init(argc, argv)
int argc;
char *argv[];
{
if(signal(SIGINT, SIG_DFL) == SIG_ERR)
error("Couldn't establish ^C handler");
}
/*********************************************************************
error - takes control when aborted with ^C
**********************************************************************/
void
error(msg)
char *msg;
{
fputs(msg, stderr);
exit(1);
}
/*********************************************************************
cbreak - takes control when aborted with ^C
**********************************************************************/
/*
void
cbreak()
{
fputs("Aborted by Operator", stderr);
exit(3);
}
*/
/*********************************************************************
os_mavl - figure how much memory can be allocated
**********************************************************************/
/*
MEM_SIZE
os_mavl()
{
return (MEM_SIZE)_bios_memsize() / K;
}
*/
/*********************************************************************
os_flength - returns number of bytes in file
**********************************************************************/
#include <io.h>
FILE_SIZE
os_flength(fptr)
FILE *fptr;
{
return filelength(fileno(fptr));
}